﻿<%@ Page Language="C#" MasterPageFile="~/admin/Admin.master" AutoEventWireup="true" CodeFile="HienthichitietDDH.aspx.cs" Inherits="admin_HienthichitietDDH" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<script type="text/javascript">
    function isconfirm() {
        var ck = confirm('Bạn có chắc xoá hay không?');
        if (ck == true)
            return true;
        else
            return false;
    }

        </script>
    <form id="form1" runat="server">
    <table style="width:100%; height: 100px;">
        <tr>
            <td style="width: 400px">
            <table  border="1" style="width: 600px">
            
                <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1" 
                    onitemcommand="Repeater1_ItemCommand">
                <HeaderTemplate>
                <tr>
                            <th align =center>Mã Đơn Đặt Hàng</th>
							<th align =center>Mã Máy</th>
							<th align =center>Số Lượng</th>
							<th align =center>Giá Bán</th>
                            <th align =center>Xoá</th>
                             <th align =center>Sửa</th>
                </tr>
                </HeaderTemplate>
                
                <ItemTemplate>
                <tr>
                <td align =center><asp:HyperLink ID="hplmaddh" runat="server" NavigateUrl='<%# "~/ThemDonDatHang.aspx?maddh=" + DataBinder.Eval(Container.DataItem,"maddh")%>' Text='<%# DataBinder.Eval(Container.DataItem,"maddh")%>' /></td>
							<td align =center><asp:HyperLink ID="hplmamay" runat="server" NavigateUrl='<%# "~/ThemLK.aspx?mamay=" + DataBinder.Eval(Container.DataItem,"mamay")%>' Text='<%# DataBinder.Eval(Container.DataItem,"mamay")%>' /></td>
							<td align =center><%#Eval("soluong")%></td>
							<td align =center><%#Eval("giaban")%></td>							
							<td align =center><asp:ImageButton ID="imagebtxoa" runat="server" Width="20" Height="20" CommandArgument='dk' CommandName="Xoa" OnClientClick='return isconfirm()'
            ImageUrl="images/action_remove.png" /><a href="SuaCT_DDHLK.aspx?maddh=<%#Eval("maddh")%>"></a></td>
                <td align=center> <a href="SuaCT_DDH.aspx?maddh=<%#Eval("maddh")%>"> <img src="images/action_check.png"  alt ="Check" id ="check" /></a></td>
                
                </tr>
                
                
                </ItemTemplate>
                </asp:Repeater>
                </table>
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:maytinhxachtayConnectionString %>" 
                    SelectCommand="SELECT [MaDDH], [MaMay], [SoLuong], [GiaBan] FROM [CT_DonDatHang]">
                </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td style="width: 600px">
                <asp:Repeater ID="Repeater2" runat="server">
                </asp:Repeater>
            </td>
        </tr>
        </table>
    </form>
</asp:Content>

